package cn.nlsde.service.impl;

import cn.nlsde.dao.TemplateDetailMapper;
import cn.nlsde.entity.TemplateDetail;
import cn.nlsde.service.TemplateDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by by on 2016/10/21.
 */
@Service
public class TemplateDetailServiceImpl implements TemplateDetailService {

    @Autowired
    TemplateDetailMapper templateDetailMapper;

    @Override
    public int save(TemplateDetail obj) {
        return 0;
    }

    @Override
    public int delete(TemplateDetail obj) {
        return 0;
    }

    @Override
    public int update(TemplateDetail obj) {
        return templateDetailMapper.updateByPrimaryKey(obj);
    }

    @Override
    public TemplateDetail selectById(Integer id) {
        return null;
    }

    @Override
    public List<TemplateDetail> selectAll() {
        return null;
    }

    @Override
    public int deleteById(Integer id) {
        return templateDetailMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int saveBatch(List<TemplateDetail> lists) {
        return templateDetailMapper.insertBatch(lists);
    }

    @Override
    public List<TemplateDetail> selectByTemplateId(Integer templateId) {
        return templateDetailMapper.selectByTemplateId(templateId);
    }

    @Override
    public int deleteBathByIds(Integer[] ids) {
        return templateDetailMapper.deleteBathByIds(ids);
    }

    @Override
    public int deleteByTemplateId(Integer templateId) {
        return templateDetailMapper.deleteByTemplateId(templateId);
    }
}
